package com.homeWork;

import com.homeWork.factory.FishFactory;
import com.homeWork.factory.WaterFishFactory;
import com.homeWork.fish.Fish;
import com.homeWork.fish.impl.*;

import java.math.BigInteger;
import java.util.Scanner;

/**
 * @author mxs
 */
public class Test {
    public static void main(String[] args) {
        FishFactory fishFactory =
                new FishFactory();
        while (true) {
            Scanner scanner = new Scanner(System.in);
            String fishType = scanner.next();
            if (fishType == null) {
                break;
            }
            Fish fish = fishFactory.createFish(fishType);
            fish.swim();
        }
    }
}
